<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
<title>订单预付款信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<script language="javascript">
function doUpdType(){
	if(check()){
		if(confirm("确认修改信息？")){
			document.all.operate.value = "updinfo";
			document.forms[0].submit();
		}
	}
}
 //限制添加快捷内容的字数  
var maxLength =30; 
function MaxInput(fo,len) {
	if(len!=""){
		maxLength=len;
	}
	if (fo.value.length > maxLength) {
		alert("输入内容过多！");
		fo.value = fo.value.substring(0, maxLength);
	}
}
</script>
</head>
<body >
<form name="form1" method="post" action="<%=path %>/plangather.action">
<script type="text/javascript">
if('${msg}'=='true'){
	_alert('修改成功');
	doclose();
	parent.document.forms[0].submit();
}else if('${msg}'=='false'){
	_alert('修改失败');
}
</script>
<table width="100%" height="99%" border="0" cellpadding="0" cellspacing="0" >
    <tr>
      <td class="MainBody_body">
		<input name="operate" type="hidden" value=""/>
		<input name="to.tpid" type="hidden" value="${updinfo.tpid}" />
		<input name="to.orderId" type="hidden" value="${updinfo.orderId}"/>
		<input name="to.supplierid" type="hidden" value="${updinfo.supplierid}"/>
		<input name="to.suppliername" type="hidden" value="${updinfo.suppliername}"/>
       <div align="right" style="padding: 0 50 10 0;">
		<input type="button" class="btn" value="修 改" onclick="doUpdType()"/>&nbsp;&nbsp;
		<input type="button" class="btn" value="关 闭" onclick="doclose()"/>&nbsp;&nbsp;
		</div>
       <table  border="0" cellpadding="0" cellspacing="0" class="MainBody_table">
             <tr>
               <td  colspan="6" class="bg_title">订 单 预 付 款 信 息</td>
             </tr>
             <tr>
				<th width="13%" nowrap="nowrap">订单编号</th>
				<td width="18%" >${updinfo.orderId}</td>
	            <th width="13%" nowrap="nowrap">客户名称</th> 
	            <td width="22%">${updinfo.suppliername}</td>
	            <th width="13%" nowrap="nowrap">印刷品名称</th>
	            <td width="20%">${updinfo.name }</td>
          	</tr>
             <tr>
				<th nowrap="nowrap">经手人</th>
				<td ><input name="to.createuser" value="${updinfo.createuser}" type="text" class="readinput" readonly /></td>
	            <th nowrap="nowrap">应收金额</th> 
            	<td><input name="to.tpmoney" type="text" value="${updinfo.tpmoney}" class="readinput" style="width: 70%" readonly />/元</td>
            	<th nowrap="nowrap">实收金额</th>
            	<td><input name="to.realmoney" type="text" value="${updinfo.realmoney}" class="readinput" style="width: 70%" readonly/>/元</td>
          	</tr>
          
          <tr>
            <th nowrap="nowrap">收款方式</th>
            <td><select name="to.tpway" style="width: 80%" ></select></td>
            <th nowrap="nowrap">收款日期</th> 
            <td ><input name="to.tpdate" type="text" value="${updinfo.tpdate}" style="width: 98%" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" class="Wdate"></td>
            <th nowrap="nowrap">收款人</th>
            <td ><select name="to.tpperson" style="width: 98%">
           		<c:forEach var="person" varStatus="status" items="${personlist}">
				<option value="${person.personname }" <c:if test="${updinfo.tpperson==person.personname}">selected</c:if>>${person.personname }</option>
				</c:forEach></select></td>
          </tr>
          
          <tr>
            <th nowrap="nowrap">发票金额</th>
            <td ><input name="to.billmoney" type="text" value="${updinfo.billmoney}" check="checkNaN" title="发票金额" maxlength="50" style="width: 80%"/>/元</td>
            <th nowrap="nowrap">发票类型</th> 
            <td ><select name="to.billtype" style="width: 95%"></select></td>
            <th nowrap="nowrap">发票编号</th>
            <td ><input name="to.bill" type="text" value="${updinfo.bill}" check="checkInt" title="发票编号" maxlength="50"/></td>
          </tr>
          
          <tr>
            <th align="center" nowrap="nowrap" >备注信息</th> 
            <td colspan="5"><textarea name="to.remark" style="width: 100%;" rows="5" onblur="MaxInput(this,100)">${updinfo.remark}</textarea></td>
          </tr>
      </table>
      </td>
  </tr>
</table>
<script type="text/javascript">
doSelectInfo(document.all["to.tpway"],'tpway','${updinfo.tpway}',false);
doSelectInfo(document.all["to.billtype"],'billtype','${updinfo.billtype}',false);
</script>
</form>
</body>
</html>
